<?php

namespace ApigilityCompany\DoctrineEntity;

use ApigilityAddress\DoctrineEntity\Address;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Table;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\OneToOne;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\JoinTable;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\ManyToMany;
use Doctrine\ORM\Mapping\OneToMany;

/**
 * Class Company
 * @package ApigilityCompany\DoctrineEntity
 * @Entity @Table(name="hl_company")
 */
class Company
{
    const SEX_MALE = 1;    // 男性
    const SEX_FEMALE = 2;  // 女性


    /**
     * 用户标识
     *
     * @Id @Column(type="string", length=255, nullable=false)
     */
    protected $id;

    /**
     * 昵称
     *
     * @Column(type="string", length=50, nullable=true)
     */
    protected $name;

    /**
     * 年龄
     * @Column(type="smallint", nullable=true)
     */
    protected $phone;

    /**
     * 地址
     * @Column(type="string", length=50, nullable=true)
     */
    protected $id_img_url;

    /**
     * 特色
     * @Column(type="string", length=50, nullable=true)
     */
    protected $bussess_img_url;

    /**
     * 年龄
     * @Column(type="string", length=50, nullable=true)
     */
    protected $cate_id;

    /**
     * 
     * @Column(type="string", length=50, nullable=true)
     */
    protected $verifiy_code;

    /**
     * 
     * @Column(type="string", length=50, nullable=true)
     */
    protected $added_time;

    /**
     * 
     * @Column(type="string", length=50, nullable=true)
     */
    protected $updated_time;

    
  
    /**
     * Oauth2认证token
     * @OneToMany(targetEntity="ApigilityOauth2Adapter\DoctrineEntity\OauthAccessToken", mappedBy="user")
     */
    protected $tokens;

    public function __construct()
    {
        $this->professionalCertifications = new ArrayCollection();
        $this->tokens = new ArrayCollection();
    }

    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    public function getId()
    {
        return $this->id;
    }

    public function setname($name)
    {
        $this->name = $name;
        return $this;
    }

    public function getIdImgUrl()
    {
        return $this->id_img_url;
    }

    public function setIdImgUrl($id_img_url)
    {
        $this->id_img_url = $id_img_url;
        return $this;
    }

    public function setCateId($cate_id)
    {
        $this->cate_id = $cate_id;
        return $this;
    }

    public function getCateId()
    {
        return $this->cate_id;
    }

    public function getBussessImgUrl()
    {
        return $this->bussess_img_url;
    }

    public function setBussessImgUrl($bussess_img_url)
    {
        $this->bussess_img_url = $bussess_img_url;
        return $this;
    }

    public function getname()
    {
        return $this->name;
    }


    public function setPhone($phone)
    {
        $this->phone = $phone;
        return $this;
    }

    public function getPhone()
    {
        return $this->phone;
    }

    public function setVerifiyCode($verifiy_code)
    {
        $this->verifiy_code = $verifiy_code;
        return $this;
    }

    public function getVerifiyCode()
    {
        return $this->verifiy_code;
    }

    public function setAddedTime($added_time)
    {
        $this->added_time = $added_time;
        return $this;
    }

    public function getAddedTime()
    {
        return $this->added_time;
    }
    

    public function setUpdatedTime($updated_time)
    {
        $this->updated_time = $updated_time;
        return $this;
    }

    public function getUpdatedTime()
    {
        return $this->updated_time;
    }

    // public function setPersonalCertification($personalCertification)
    // {
    //     $this->personalCertification = $personalCertification;
    //     return $this;
    // }

    // public function getPersonalCertification()
    // {
    //     return $this->personalCertification;
    // }

    

    public function setTokens($tokens)
    {
        $this->tokens = $tokens;
        return $this;
    }

    public function getTokens()
    {
        return $this->tokens;
    }
}